from diffusers import AutoPipelineForText2Image
import torch

def generate_img():
    repo_id = "stabilityai/sdxl-turbo"
    pipeline = AutoPipelineForText2Image.from_pretrained(repo_id, torch_dtype=torch.float16, variant="fp16").to("cuda")
    prompt = "orange color cat, solo, detailed, 8k"
    image = pipeline(prompt=prompt, num_inference_steps=4, guidance_scale=0.0,width=768,height=768).images[0]
    return image

image = generate_img()
image.save("tmp/c04.png")
    